// 类继承中的构造与析构 
#include <iostream> 
using namespace std;

class Base
{
public:
    Base(){cout << "构造基类" << endl;} 
    ~Base(){cout << "析构基类" << endl;} 
};

class Derived : public Base
{
public:
    Derived(){cout << "构造子类" << endl;}
    ~Derived(){cout << "析构子类" << endl;}
};

int main(int argc, char const *argv[])
{
    Derived d;  //子类对象

    return 0;
}
